import { useRoutes } from "react-router-dom";

import Layout from "../component/layout";
import Index from "../view/index/index";
import CanvasCource from "../view/canvasCourse";
import Math from "../view/math";
import Sundry from "../view/sundry";

const RouterView = () => {
  const element = useRoutes([{
    path: "/",
    element: <Layout />,
    children: [
      {
        index: true,
        element: <Index />,
      },
      {
        path: 'canvas-cource',
        element: <CanvasCource />
      },
      {
        path: 'math',
        element: <Math />,
      },
      {
        path: 'sundry',
        element: <Sundry />,
      }
    ]
  }])

  return element
}

export default RouterView